<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;</title>
    <link rel="stylesheet" href="../../boostbook.css" type="text/css">
    <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
    <link rel="home" href="../../index.html" title="Asio">
    <link rel="up" href="../reference.html" title="Reference">
    <link rel="prev" href="async_result/return_type.html" title="async_result::return_type">
    <link rel="next"
          href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/async_result.html"
          title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;::async_result">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%">
    <tr>
        <td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="async_result/return_type.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                                      href="../reference.html"><img
        src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png"
                                                                                      alt="Home"></a><a accesskey="n"
                                                                                                        href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/async_result.html"><img
        src="../../next.png" alt="Next"></a>
</div>
<div class="section">
    <div class="titlepage">
        <div>
            <div><h3 class="title">
                <a name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_"></a><a
                    class="link"
                    href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.html"
                    title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;">async_result&lt;
                std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;</a>
            </h3></div>
        </div>
    </div>
    <p>
        <a class="indexterm"
           name="asio.indexterm.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_"></a>
    </p>
    <p>
        Partial specialisation of <code class="computeroutput"><span class="identifier">async_result</span></code>
        for <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span
            class="identifier">packaged_task</span></code>.
    </p>
    <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">typename</span> <span class="identifier">Result</span><span class="special">,</span>
    <span class="keyword">typename</span><span class="special">...</span> <span class="identifier">Args</span><span
                class="special">,</span>
    <span class="keyword">typename</span> <span class="identifier">Signature</span><span class="special">&gt;</span>
<span class="keyword">class</span> <span class="identifier">async_result</span><span class="special">&lt;</span> <span
                class="identifier">std</span><span class="special">::</span><span
                class="identifier">packaged_task</span><span class="special">&lt;</span> <span
                class="identifier">Result</span><span class="special">(</span><span class="identifier">Args</span><span
                class="special">...)&gt;,</span> <span class="identifier">Signature</span> <span
                class="special">&gt;</span>
</pre>
    <h5>
        <a name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.h0"></a>
        <span><a
                name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.types"></a></span><a
            class="link"
            href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.html#asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.types">Types</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link"
                           href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/completion_handler_type.html"
                           title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;::completion_handler_type"><span
                                class="bold"><strong>completion_handler_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The packaged task is the concrete completion handler type.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link"
                           href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/return_type.html"
                           title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;::return_type"><span
                                class="bold"><strong>return_type</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The return type of the initiating function is the future obtained
                        from the packaged task.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.h1"></a>
        <span><a
                name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.member_functions"></a></span><a
            class="link"
            href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.html#asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.member_functions">Member
        Functions</a>
    </h5>
    <div class="informaltable">
        <table class="table">
            <colgroup>
                <col>
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>
                    <p>
                        Name
                    </p>
                </th>
                <th>
                    <p>
                        Description
                    </p>
                </th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>
                    <p>
                        <a class="link"
                           href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/async_result.html"
                           title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;::async_result"><span
                                class="bold"><strong>async_result</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        The constructor extracts the future from the packaged task.
                    </p>
                </td>
            </tr>
            <tr>
                <td>
                    <p>
                        <a class="link"
                           href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/get.html"
                           title="async_result&lt; std::packaged_task&lt; Result(Args...)&gt;, Signature &gt;::get"><span
                                class="bold"><strong>get</strong></span></a>
                    </p>
                </td>
                <td>
                    <p>
                        Returns the packaged task's future.
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h5>
        <a name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.h2"></a>
        <span><a
                name="asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.requirements"></a></span><a
            class="link"
            href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.html#asio.reference.async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_.requirements">Requirements</a>
    </h5>
    <p>
        <span class="emphasis"><em>Header: </em></span><code class="literal">asio/packaged_task.hpp</code>
    </p>
    <p>
        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">asio.hpp</code>
    </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%">
    <tr>
        <td align="left"></td>
        <td align="right">
            <div class="copyright-footer">Copyright © 2003-2022 Christopher M. Kohlhoff<p>
                Distributed under the Boost Software License, Version 1.0. (See accompanying
                file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
            </p>
            </div>
        </td>
    </tr>
</table>
<hr>
<div class="spirit-nav">
    <a accesskey="p" href="async_result/return_type.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u"
                                                                                                      href="../reference.html"><img
        src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png"
                                                                                      alt="Home"></a><a accesskey="n"
                                                                                                        href="async_result_lt__std__packaged_task_lt__Result_lp_Args_ellipsis__rp__gt__comma__Signature__gt_/async_result.html"><img
        src="../../next.png" alt="Next"></a>
</div>
</body>
</html>
